import { request } from '../../../../config/request'
import config from '../../../../config/config'

let req = {}
if (MODULE_TO_ROUTES['roleListModel'].reqObj) {
	req = MODULE_TO_ROUTES['roleListModel'].reqObj;
}

// 外部配置请求改写例子
export async function getList(params) {
	let paramObj = req && req.getRoleList || {}
	return request({
		url: '/sys/role/list',
		method: 'GET',
		data: params,
		...paramObj
	});
};

// 单个启用禁用
export async function updateStatus(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/status/update`,
		method: 'PUT',
		data: params
	});
};

// 批量删除
export async function batchDelete(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/delete`,
		method: 'DELETE',
		data: params
	});
};

// 批量启用禁用
export async function batchUpdate(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/status/batch/update`,
		method: 'PUT',
		data: params
	});
};

// 删除校验
export async function checkDelete(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/check/role`,
		method: 'GET',
		data: params
	});
};




















